package com.oa.admin.service;

import com.joneying.common.web.response.Resp;
import com.oa.admin.dto.HouseAddDTO;
import com.oa.admin.dto.HouseConditionDTO;
import com.oa.admin.dto.HouseUpdateDTO;
import com.oa.admin.vo.HouseListVO;
import com.oa.core.PageResult;
import com.oa.admin.entity.House;
import com.baomidou.mybatisplus.service.IService;
import com.oa.core.exception.BusinessException;
import com.oa.core.exception.DataIsEmptyException;

/**
 * <p>
 * 房屋表 服务类
 * </p>
 *
 * @author syb123
 * @since 2019-01-22
 */
public interface IHouseService extends IService<House> {
    /**
     * 自定义分页
     *
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageResult<House> findList(Integer pageNum, Integer pageSize);

    /**
     * 根据id查询
     */
    House findHouseById(String id);


    /**
     * 新增房屋
     *
     * @param houseAddDTO
     * @return
     */
    Resp addHouse(HouseAddDTO houseAddDTO) throws BusinessException;

    /**
     * 根据条件查询房屋列表
     *
     * @param houseConditionDTO
     * @return
     */
    PageResult<HouseListVO> findHouseListByCondition(HouseConditionDTO houseConditionDTO) throws DataIsEmptyException;

    /**
     * 根据主键id查询房屋详情
     *
     * @param id
     * @return
     */
    Resp findHouseDetailsById(String id);

    /**
     * 根据主键id编辑房屋信息
     *
     * @param houseUpdateDTO
     * @return
     */
    Resp updateHouseDetailsById(HouseUpdateDTO houseUpdateDTO) throws BusinessException;

    /**
     * 根据主键id删除房屋信息
     *
     * @param id
     * @return
     */
    Resp deleteHouseDetailsById(String id) throws BusinessException;

    /**
     * 导出房屋租赁列表
     *
     * @return
     */
    Resp exportHouseList() throws DataIsEmptyException, BusinessException;

    boolean deleteHouse(String id);
}
